#include "PAP_defs.h"
#include "derivative.h" /* include peripheral declarations */

#define ADC_CLK_DIVIDER_8 3
#define ADC_CLK_DIVIDER_4 2
#define ADC_CLK_DIVIDER_2 1
#define ADC_CLK_DIVIDER_1 0

#define ADC_SHORT_SAMPLE_TIME 0
#define ADC_LONG_SAMPLE_TIME 1

#define ADC_CONTINOUS_CONVERSION    1
#define ADC_SINGLE_CONVERSION       0

#define ADC_INTERRUPTS_ENABLED  1
#define ADC_INTERRUPTS_DISABLED 0

#define ADC_RESOLUTION_10BIT    2
#define ADC_RESOLUTION_8BIT     0

void vfnADC_ResolutionSelect (uint8 u8res);

void vfnADC_LowPowerMode (void); 

void vfnADC_HighSpeedMode (void); 

void vfnADC_UseBusClock (void);

void vfnADC_ClockDivideSelect (uint8 u8ADC_ClockDivider);

void vfnADC_SetSampleTime (uint8 u8ADC_SampleTime);

void vfnADC_ChannelSelect (uint8 u8channel);

uint16 u16ADC_GetResult (void);

uint8 u8ADC_GetResult (void);

void vfnADC_PinEnable (uint8 u8pin);

void vfnADC_PinDisable (uint8 u8pin) ;

uint8 u8ADC_CheckCCF (void);

void vfnADC_InterruptSetup (uint8 u8mode);

void vfnADC_ConversionMode (uint8 u8mode);